package org.dtrd.modules.record.service;

import org.dtrd.modules.record.entity.bean.AvgRecordBean;
import org.dtrd.modules.record.entity.bean.DailyKetoneRecordBean;
import org.dtrd.modules.record.entity.bean.KetoneStatisticBean;
import org.dtrd.modules.record.entity.po.DtrdEntRdSigninKetone;

import java.util.List;

/**
 * @author 萧
 * @date:2021-08-22 3:28 下午
 **/
public interface IKetoneRecordService extends IRecordService<DtrdEntRdSigninKetone> {

    Integer getKetoneRecordCount(Integer patientId, String startDate, String endDate);

    List<DailyKetoneRecordBean> getAllGroupedKetoneRecord(Integer patientId, String startDate, String endDate, Integer page, Integer pageSize);

    /**
     * 获取尿酮统计数据
     */
    KetoneStatisticBean getKetoneRecordStatistic(Integer patientId, String startDate, String endDate);

    /**
     * 计算时间段内尿酮平均值
     * @param patientId
     * @param startDate
     * @param endDate
     * @return
     */
    AvgRecordBean getAvgValue(Integer patientId, String startDate, String endDate);

    Boolean saveOrUpdateKetone(DailyKetoneRecordBean ketoneInfo);
}
